package com.art.wisdom.config;

import java.util.ArrayList;
import java.util.List;

import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.PropertySource;
import org.springframework.stereotype.Component;

/**
 * 做测试
 * @author xiezhiwei
 * @email xiezhiwei0314@126.com
 *
 */
@Component
@ConfigurationProperties(prefix = "myConfig")
@PropertySource("classpath:config.yml") 
public class Config {
	
    private List<Server> servers = new ArrayList<>();
    
    private String id;
    
    private String name;
    

	public List<Server> getServers() {
		return servers;
	}

	public void setServers(List<Server> servers) {
		this.servers = servers;
	}

	public String getId() {
		return id;
	}

	public void setId(String id) {
		this.id = id;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}
	
	
	public static class Server{
		
		private String serverName;
		
		private String port;
		
		private String path;
		
		
		public String getServerName() {
			return serverName;
		}

		public void setServerName(String serverName) {
			this.serverName = serverName;
		}

		public String getPort() {
			return port;
		}

		public void setPort(String port) {
			this.port = port;
		}

		public String getPath() {
			return path;
		}

		public void setPath(String path) {
			this.path = path;
		}
		
	}

}
